'use strict';

module.exports = app => {
    const {
        INTEGER,
        STRING,
        TEXT,
        BIGINT,
        DATE,
        NOW
    } = app.Sequelize;

    const User = app.model.define('user_mess', {
        id: {
            type: INTEGER,
            primaryKey: true,
            autoIncrement: true,
        },
        user_account: STRING,
        user_password: STRING,
        user_router: TEXT,
        user_type: INTEGER,
        user_display: {
            type: BIGINT(1),
            defaultValue: 0,
        },
        user_new: {
            type: DATE,
            defaultValue: NOW,
        },
    }, {
        timestamps: false,
        underscored: true,
        freezeTableName: true,
    });

    return User;
};